package com.sgam.mf.domain.entity;


import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.map.annotate.JsonDeserialize;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.format.annotation.DateTimeFormat;

import com.sgam.utils.CustomDateDeserializer;
import com.sgam.utils.CustomDateSerializer;

@Entity
@Table(name = "CONTRACT_ADD_AGREE")
public class ContractAddAgree {

		@Id
		@Column(name = "id")
		@GeneratedValue
		private Integer id;
		
//		@Column(name = "partener_fk") 
//		private Integer partenerFk;
		
		@ManyToOne
		@JoinColumn(name = "partener_fk", nullable = true)	
	    private RegPartners regPartners;
		
		@Column(name = "company") 
		private String company;

		@Column(name = "goods") 
		private String goods;

		@Column(name = "amount") 
		private BigInteger amount;

		@JsonSerialize(using = CustomDateSerializer.class)
		@JsonDeserialize(using = CustomDateDeserializer.class)
		@DateTimeFormat(pattern="dd.MM.yyyy")
		@Column(name = "date_trans") 
		private Date dateTrans;
		
		@Column(name = "comments") 
		private String comments;

		public Integer getId() {
			return id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		public String getCompany() {
			return company;
		}

		public void setCompany(String company) {
			this.company = company;
		}

		public String getGoods() {
			return goods;
		}

		public void setGoods(String goods) {
			this.goods = goods;
		}


		
		public BigInteger getAmount() {
			return amount;
		}

		public void setAmount(BigInteger amount) {
			this.amount = amount;
		}

		public Date getDateTrans() {
			return dateTrans;
		}

		public void setDateTrans(Date dateTrans) {
			this.dateTrans = dateTrans;
		}

		public String getComments() {
			return comments;
		}

		public void setComments(String comments) {
			this.comments = comments;
		}

		public RegPartners getRegPartners() {
			return regPartners;
		}

		public void setRegPartners(RegPartners regPartners) {
			this.regPartners = regPartners;
		}



//		public Integer getPartenerFk() {
//			return partenerFk;
//		}
//
//		public void setPartenerFk(Integer partenerFk) {
//			this.partenerFk = partenerFk;
//		}

		

}
